package com.top.application.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.top.application.dao.RoleEntityMapper;
import com.top.application.entity.RoleEntity;
import com.top.application.service.RoleService;

/**
 * 
 * @ClassName: RoleServiceImpl 
 * @Description: TODO(角色管理service层) 
 * @author zhaiey
 * @date 2018年3月30日 上午10:49:40 
 *
 */
@Service
public class RoleServiceImpl implements RoleService{

	@Autowired
	private RoleEntityMapper roleMapper;
	
	@Override
	public int delete(Integer id) {
		return roleMapper.delete(id);
	}

	@Override
	public int insert(RoleEntity record) {
		return roleMapper.insert(record);
	}

	@Override
	public RoleEntity selectById(Integer id) {
		return roleMapper.selectById(id);
	}

	@Override
	public int update(RoleEntity record) {
		return roleMapper.update(record);
	}

	@Override
	public List<RoleEntity> listByMap(Map<String, Object> paramMap) {
		return roleMapper.listByMap(paramMap);
	}

	@Override
	public List<RoleEntity> getRoleValuesByUserId(Integer userId) {
		return roleMapper.getRoleValuesByUserId(userId);
	}

	@Override
	public List<RoleEntity> getRoleValuesByClientId(Integer clientId) {
		return roleMapper.getRoleValuesByClientId(clientId);
	}

}
